Field of the Invention
This invention relates generally to the field of computer processors. More particularly, the invention relates to an apparatus and method for intelligent resource provisioning for shadow structures.
Description of the Related Art
Rapid advances have recently taken place in graphics processor unit (GPU) virtualization. Virtualized graphics processing environments are used, for example, in the media cloud, remote workstations/desktops, Interchangeable Virtual Instrumentation (IVI), rich client virtualization, to name a few. Certain architectures perform full GPU virtualization through trap-and-emulation to emulate a full-featured virtual GPU (vGPU) while still providing near-to-native performance by passing through performance-critical graphics memory resources.
With the increasing importance of GPUs in servers to support 3D, media and GPGPU workloads, GPU virtualization is becoming more widespread. How to virtualize GPU memory access from a virtual machine (VM) is one of the key design factors. The GPU has its own graphics memory: either dedicated video memory or shared system memory. When system memory is used for graphics, guest physical addresses (GPAs) need to be translated to host physical addresses (HPAs) before being accessed by hardware.
There are various approaches to do the translation for GPUs. Some implementations perform translation with hardware support, but GPU can be passed-through to one VM only. Another solution is a software approach which constructs shadow structures for the translation. For instance, shadow page tables are implemented in some architectures such as the full GPU virtualization solution mentioned above, which can support multiple VMs to share a physical GPU.